#include "hc.h"

extern UART_HandleTypeDef huart4;

uint8_t hc_buf[12] = {0xaa,0xbb,0,12,0,0,0,0,0,0,0,0xcc};



void HC_TransferPack(int16_t data1,int16_t data2,int16_t data3)
{
	uint8_t i = 0;
	hc_buf[4] = (uint8_t)((data1&0xff00)>>8);
	hc_buf[5] = (uint8_t)(data1&0x00ff);
	hc_buf[6] = (uint8_t)((data2&0xff00)>>8);
	hc_buf[7] = (uint8_t)(data2&0x00ff);
	hc_buf[8] = (uint8_t)((data3&0xff00)>>8);
	hc_buf[9] = (uint8_t)(data3&0x00ff);	
	
	hc_buf[10] = 0;
	
	HAL_UART_Transmit(&huart4,hc_buf,12,10);
}



